import { createApp} from 'vue'
import App from './App.vue'
import router from './router'
import './utils/rem.js';
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import "element-plus/theme-chalk/el-loading.css";
import "element-plus/theme-chalk/el-message.css";
import "element-plus/theme-chalk/el-notification.css";
import "element-plus/theme-chalk/el-message-box.css";
import * as Icons from '@element-plus/icons-vue'
import VueI18n from '@/lang/index';
import dir from './directive/index'
const app = createApp(App)
app.directive('preventReClick', dir.preventReClick);
app.directive('zindexClick', dir.zindexClick);
app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.use(router)
app.use(VueI18n).mount('#app')
Object.keys(Icons).forEach(key => {
  app.component(key, Icons[key as keyof typeof Icons])
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}